$(function(){
    $('#listRecruitTable').bootstrapTable({
        url: "/recruitmentManager/listRecruit",
        //data: JSON.stringify(institutionId),//参数
        method: 'post',
        /*        queryParams: function (params) {
                    return {
                        institutionId: institutionId
                    };

                },*/
        showRefresh: true,  //显示刷新按钮
        search: true,
        toolbar:'#toolbar',
        // sortable: true,                     //是否启用排序
        // sortOrder: "asc",                   //排序方式
        pageList: [3, 5, 10, 20],        //可供选择的每页的行数（*）
        striped : true,     //设置为true会有隔行变色效果
        //sidePagination:'server',//服务器端分页默认接受rows和total
        pagination:true,//客户端分页
        sidePagination:'client',
        idFiled:'recruit_id',//必选属性
        pageNumber:1,
        pageSize:10,
        columns: [
/*            {
                field: 'checkId',
                checkbox:true,
                clickToSelect:true
            },*/
            {
                field: 'recruit_id',
                title: '招聘信息id',
                visible:false

            },{
                field: 'iname',
                title: '机构'
            },{
                field: 'pname',
                title: '职位'
            },{
                field: 'recruit_num',
                title: '招聘人数'
            },{
                field: 'start_date',
                title: '开始日期',
                formatter: function (start_date) {
                    var tmpDate = new Date(start_date);
                    var yy = tmpDate.getFullYear();

                    var m = tmpDate.getMonth() + 1;

                    var dd = tmpDate.getDate();

                    var hh = tmpDate.getHours();

                    var mm = tmpDate.getMinutes();

                    var ss = tmpDate.getSeconds();

                    return yy + '-' + m + '-' + dd;
                }
            },{
                field: 'stop_date',
                title: '结束日期',
                formatter: function (stop_date) {
                    var tmpDate = new Date(stop_date);
                    var yy = tmpDate.getFullYear();

                    var m = tmpDate.getMonth() + 1;

                    var dd = tmpDate.getDate();

                    var hh = tmpDate.getHours();

                    var mm = tmpDate.getMinutes();

                    var ss = tmpDate.getSeconds();

                    return yy + '-' + m + '-' + dd;
                }
            },{
                field: 'claim',
                title: '招聘简介'
            }]
    });
});